import Vue from 'vue';
import Router from 'vue-router';

import Home from '../views/components/common/Home.vue';
import Dashboard from '../views/components/page/Dashboard.vue';
import BaseTable from '../views/components/page/BaseTable.vue';
import Tabs from '../views/components/page/Tabs.vue';
import BaseForm from '../views/components/page/BaseForm.vue';
//import VueEditor from '../views/components/page/VueEditor.vue';
//import Markdown from '../views/components/page/Markdown.vue';

import Page404 from '../views/components/page/404.vue';
import Page403 from '../views/components/page/403.vue';

import CreateProject from '../views/components/generator/CreateProject.vue';

Vue.use(Router);
export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: Home,
            meta: { title: '自述文件' },
            children:[
                {
                    path: '/dashboard',
                    component:Dashboard,
                    meta: { title: '系统首页' }
                },
                {
                    path: '/table',
                    component: BaseTable,
                    meta: { title: '基础表格' }
                },
                {
                    path: '/create-project',
                    component: CreateProject,
                    meta: { title: '建立项目' }
                },
                {
                    path: '/tabs',
                    component: Tabs,
                    meta: { title: 'tab选项卡' }
                },
                {
                    path: '/form',
                    component: BaseForm,
                    meta: { title: '基本表单' }
                }
            ]
        },
        {
            path: '/404',
            component: Page404
        },
        {
            path: '/403',
            component: Page403
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
})
